<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
    "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html><head>
    <title>NKDCode39Barcode</title>
	<meta name="generator" content="HeaderDoc">
</head><body bgcolor="#ffffff"><h1><font face="Geneva,Arial,Helvtica">NKDCode39Barcode</font></h1><hr><br>
<h2>Abstract</h2>
Concrete subclass of NKDBarcode that generated Code 3 of 9 (a/k/a Code 39) Barcodes.
<h2>Discussion</h2>
Code 3 of 9 Barcode using a 2:1 wide to narrow ratio for bars and defaults to a
12 mil bar width. Code 3 of 9 supports bars as narrow as 7.5 mils, but on many
printers, due to ink bleed or toner jitter, 7.5 creates an un-scannable barcode
<hr><br><h2>Methods</h2>

<h3><a name="_encodeChar:">_encodeChar:</a></h3>
<b>Abstract:</b> Overridden to encode characters according to Code 3 of 9 specifications.

<blockquote><pre><tt>- (NSString *)<B>_encodeChar:</B>(char)<I>inChar;</I> </tt><br>
</pre></blockquote>
<p></p>
<h4>Parameters</h4>
<blockquote>
<table border="1"  width="90%">
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tr><td align="center"><tt>inChar</tt></td><td>ASCII-8 Character to be encoded</td></tr>
</table>
</blockquote>
<b>Result:</b> String of 0s and 1s represented the Code 39 encoding of content
 
<hr>

<h3><a name="generateChecksum">generateChecksum</a></h3>
<b>Abstract:</b> Generates code 3 of 9 check digit based on content

<blockquote><pre><tt>- (void)<B>generateChecksum;</B> </tt><br>
</pre></blockquote>
<p>Code 39's optional checksum is rarely used, but we'll provide the option here. It's a fairly
simple algorithm - it's the sum of the value (via lookup table) of each character and doing a
modulus 43 on the sum, storing the result as a character in the field checkDigit
 </p>
<hr>

<h3><a name="initWithContent:printsCaption">initWithContent:printsCaption</a></h3>
<b>Abstract:</b> Overriden to perform an uppercaseString on inContent - Code 3 of 9 supports alphanumeric
but only upper case.

<blockquote><pre><tt>- (id)<B>initWithContent:</B>(NSString *)inContent
      <I></I> <B>printsCaption:</B>(BOOL)<I>inPrints;</I> </tt><br>
</pre></blockquote>
<p></p>
<h4>Parameters</h4>
<blockquote>
<table border="1"  width="90%">
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tr><td align="center"><tt>inContent</tt></td><td>Alphanumeric string to be encoded</td></tr>
<tr><td align="center"><tt>inPrints</tt></td><td>YES if caption should be printed</td></tr>
</table>
</blockquote>
<b>Result:</b> Code 3 of 9 Barcode object encoding the data passed in inContent

<hr>

<h3><a name="initiator">initiator</a></h3>
<b>Abstract:</b> Overridden to return the encoded start character for 3 of 9, an encoded asterick '*'

<blockquote><pre><tt>- (NSString *)<B>initiator;</B> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> String with the encoded version of the asterick character
 
<hr>

<h3><a name="terminator">terminator</a></h3>
<b>Abstract:</b> Overridden to return the encoded end character for 3 of 9, an encoded asterick '*'

<blockquote><pre><tt>- (NSString *)<B>terminator;</B> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> String with the encoded version of the asterick character

<hr>
<p>(Last Updated 4/21/2003)
</p></body></html>
